<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var num=prompt("请输入行数");
			for(var i=1;i<=num;i++){
				for(var k=1;k<=num-i;k++){
					document.write("&nbsp;");
					
				}
				for(var j=1;j<=2*i-1;j++){
					document.write("*");
					
				}
				document.write("</br>");
			}
		</script>
	</body>
</html>
